﻿@model Inovout.Cloud.Applications.Security.Models.ServerApplicationCredential
<div class="clientId-Dialog">
    @using (Html.BeginForm("Save", "ServerApplicationCredential"))
    { 
        @*@Html.AntiForgeryToken()*@
        @Html.ValidationSummary(true)
        <input type="hidden" value="@ViewBag.ApplicationUser.Id" name="ApplicationUser.Id" />
        @Html.HiddenFor(a => a.Id)

        <div class="clientID-Title">
            <span>Create a server key and configure allowed IPs</span>
        </div>
        <div class="serverapp-des">
             <div>This key should be kept secret on your server.</div>
             <div> Every API request is generated by software running on a machine that you control. Per-user limits will be enforced using the address found in each request's userIp parameter, (if specified). If the userIp parameter is missing, your machine's IP address will be used instead. </div>
        </div>
        <div class="serverapp-address">
            <div>Accept requests from these server IP addresses</div>
            <span>One IP address or subnet per line. Example: 192.168.0.1 or 172.16.0.0/16</span>
        </div>
        <div class="serverapp-ip">
             @Html.TextAreaFor(a => a.IPs, 3, 3, new { @class = "w-1", @placeholder = "IP地址", @style = "height: 5em;", @id = "IPs" })
        </div>
        <div class="project-create-buttons">
            <input type="submit" id="credentialSubmit" value="创建" data-click-command="page.closeDialog()" />
        </div>

    }
</div>
